import java.util.*;
public abstract class ControlCenter{
    protected String TeamName;
    protected ArrayList<IObserver> players = new ArrayList<IObserver>();

    public void setTeamName(String Name) {
        this.TeamName = Name;
    }

    public String getTeamName() {
        return this.TeamName;
    }

    public String join(IObserver obs) {
        players.add(obs);
        return obs.getName() + "加入" + this.TeamName + "小队";

    }


    public String quit(IObserver obs) {
        players.remove(obs);
        return obs.getName() + "死亡被移除" + this.TeamName + "战队！";
    }


    public abstract void notifyObserver(String name);
}

